package com.monkeybrother.thread.thread;

import java.util.BitSet;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;


public class ThreadPoolTest {
    public static void main(String[] args) {
//        ExecutorService pool = Executors.newSingleThreadExecutor();
//        try {
//            pool.execute(() -> System.out.println("默认线程池的名称：" +Thread.currentThread().getName()));
//        } catch (Exception e) {
//            e.printStackTrace();
//        } finally {
//            pool.shutdown();
//        }
        int[] array = new int[] {1};
        BitSet bitSet = new BitSet(array.length);
        for (int i = 0; i < array.length; i++) {
            bitSet.set(array[i], true);
        }
        System.out.println(bitSet.size());
        System.out.println(bitSet.get(4));


    }
}
